<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>社区活动</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <style type="text/css">
        .icon {
            width: 1em;
            height: 1em;
            vertical-align: -0.15em;
            fill: currentColor;
            overflow: hidden;
        }
    </style>
    <script src="__TMPL__/public/assets/wuye/js/mui.min.js"></script>
    <link href="__TMPL__/public/assets/wuye/css/mui.min.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="__TMPL__/public/assets/wuye/css/app.css" />
    <script src="__TMPL__/public/assets/wuye/js/iconfont.js"></script>
</head>

<body>
<header class="mui-bar mui-bar-nav">
    <a class="mui-icon mui-icon-left-nav mui-pull-left" href="javascript:window.history.go(-1);"></a>
    <h1 class="mui-title">社区活动</h1>
</header>
{:widget('Wuye/nav')}
<div class="mui-content">
    <div style="padding: 10px 10px;">
        <div id="segmentedControl" class="mui-segmented-control">
            <a class="mui-control-item mui-active" href="#item1">进行中</a>
            <a class="mui-control-item" href="#item2">已结束</a>
        </div>
    </div>
    <div>
        <div id="item1" class="mui-control-content mui-active">
            {:widget('Wuye/active', ['cateName' => '社区活动','status'=>'1'])}
        </div>
        <div id="item2" class="mui-control-content">
            {:widget('Wuye/activeEnding', ['cateName' => '社区活动','status'=>'0'])}
        </div>
    </div>
</div>
</body>
<script src="__TMPL__/public/assets/wuye/js/mui.min.js"></script>
<script src="__TMPL__/public/assets/wuye/js/iconfont.js"></script>
<script>
    mui.init({
        swipeBack:true //启用右滑关闭功能
    });
    function signUp(id) {
//        mui.alert(id);
        mui.ajax("{:url('portal/wuye/signup')}",{
            data:{id:id},
            dataType:'json',//服务器返回json格式数据
            type:'post',//HTTP请求类型
            timeout:10000,//超时时间设置为10秒；
            headers:{'Content-Type':'application/json'},
            success:function(data){
                mui.toast(data.msg);
            },
            error:function(xhr,type,errorThrown){
                console.log(type);
            }
        });
    }
</script>
</html>